a = 1;
b = 2;
while (abs(a - b) > 1e-12)
    c = (a + b) / 2;
    if (test(c) > 0)
        b = c;
    else
        a = c;
    end
end
